/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package simulation2;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author kb191394
 */
public class Partie {
    
    private TypePartie type;
    private List<Tour> tours;
    private Poule[] poules = new Poule[2];

    public Partie(TypePartie type) {
        this.type = type;
        tours = new ArrayList<Tour>();
        
        poules[0] = new Poule("A");
        poules[1] = new Poule("B");
    }
    
    public Tour nouveauTour() {
        Tour tour = new Tour(tours.size()+1, this);
        tours.add(tour);
        return tour;
    }

    public List<Tour> getTours() {
        return tours;
    }

    public TypePartie getType() {
        return type;
    }
    
    public Poule getPoule(int numeroPoule) {
        return poules[numeroPoule];
    }
    
    public Poule[] getPoules() {
        return poules;
    }

    @Override
    public String toString() {
        return "Partie{" + "type=" + type + ", tours=" + tours + ", poules=" + poules + '}';
    }
    
}
